import { defineStore } from 'pinia'
import { ref } from 'vue'

export const useUserStore = defineStore('user', () => {
    const isDark = ref('light')

    const toggleDark = (val: string) => {
        isDark.value = val
    }

    return { isDark, toggleDark }
},{
    persist:{
        key:"user",
        storage:localStorage,
    }
})